package com.dcbeida.bean;


import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by wangdong on 2016/7/5.
 */
public class Tag implements Parcelable {

    private String lableDesc;//"标签描述",
    private String lableId;//"标签ID",
    private String orgId;//"店铺ID"
    private String other;


    public Tag(String lableDesc) {
        this.lableDesc = lableDesc;
    }
    public Tag() {
    }

    public Tag(String lableDesc, String lableId, String orgId) {
        this.lableDesc = lableDesc;
        this.lableId = lableId;
        this.orgId = orgId;
    }

    public Tag(String lableDesc, String lableId, String orgId, String other) {
        this.lableDesc = lableDesc;
        this.lableId = lableId;
        this.orgId = orgId;
        this.other = other;
    }

    public Tag(String lableDesc, String lableId) {
        this.lableDesc = lableDesc;
        this.lableId = lableId;
    }

    public String getOther() {
        return other;
    }

    public void setOther(String other) {
        this.other = other;
    }

    public String getLableDesc() {
        return lableDesc;
    }

    public void setLableDesc(String lableDesc) {
        this.lableDesc = lableDesc;
    }

    public String getLableId() {
        return lableId;
    }

    public void setLableId(String lableId) {
        this.lableId = lableId;
    }

    public String getOrgId() {
        return orgId;
    }

    public void setOrgId(String orgId) {
        this.orgId = orgId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o)
            return true;
        if (o == null || getClass() != o.getClass())
            return false;

        Tag tag = (Tag) o;

        if (lableDesc != null ? !lableDesc.equals(tag.lableDesc) : tag.lableDesc != null)
            return false;
        if (lableId != null ? !lableId.equals(tag.lableId) : tag.lableId != null)
            return false;
        return orgId != null ? orgId.equals(tag.orgId) : tag.orgId == null;

    }

    @Override
    public int hashCode() {
        int result = lableDesc != null ? lableDesc.hashCode() : 0;
        result = 31 * result + (lableId != null ? lableId.hashCode() : 0);
        result = 31 * result + (orgId != null ? orgId.hashCode() : 0);
        return result;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.lableDesc);
        dest.writeString(this.lableId);
        dest.writeString(this.orgId);
        dest.writeString(this.other);
    }

    protected Tag(Parcel in) {
        this.lableDesc = in.readString();
        this.lableId = in.readString();
        this.orgId = in.readString();
        this.other = in.readString();
    }

    public static final Creator<Tag> CREATOR = new Creator<Tag>() {
        @Override
        public Tag createFromParcel(Parcel source) {
            return new Tag(source);
        }

        @Override
        public Tag[] newArray(int size) {
            return new Tag[size];
        }
    };
}
